/**
 * @Author       : cxh
 * @Date         : 2021-12-25 16:39:03
 * @LastEditTime : 2021-12-29 23:27:58
 * @LastEditors  : cxh
 * @Description  : 
 * @FilePath     : \vue_WorkSpace\vue-wpt\src\main.js
 */
import Vue from 'vue'

import App from './App.vue'
// import List from "./pages/list"

import router from './router'

import {
    Modal,
    Table,
    Form,
    Input,
    Button,
    Checkbox
} from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';

import {
    POST
} from './utils/request';

Vue.use(Modal);
Vue.use(Table);
Vue.use(Form);
Vue.use(Input);
Vue.use(Button);
Vue.use(Checkbox);

Vue.config.productionTip = false

// new Vue({
//   render: h => h(App),
// }).$mount('#app')

window.addEventListener('load', () => {
    if (!localStorage.getItem('public_key')) {
        POST("/getPublicKey")
            .then(data => {
                console.log(data)
                localStorage.setItem('public_key', data);
            })
    }
})


new Vue({
    router,
    render: createElement => createElement(App)
}).$mount('#app')